#define _CRT_SECURE_NO_WARNINGS 1

#include"Calendar.h"

int main()
{
	FILE* pf = fopen("Date.txt","w");
	if (pf == NULL)
	{
		perror("fopen fail");
	}

	fprintf(pf,"%d\n",2024);
	fprintf(pf,"%2d\n", 1);
	fprintf(pf,"%2d\n", 1);

	fclose(pf);

	FILE* pf1 = fopen("Date.txt", "r");
	if (pf == NULL)
	{
		perror("fopen fail");
	}

	int year = 0, month = 0, day = 0;

	fscanf(pf1,"%d",&year);
	fscanf(pf1, "%2d",&month);
	fscanf(pf1, "%2d",&day);

	printf("%2d // %2d // %2d",year,month,day);

	fclose(pf);

	return 0;
}